﻿using Abp.Application.Services;
using Abp.Application.Services.Dto;
using Partner.Surround.Base.DataDictionaries.Dto;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Partner.Surround.Base.DataDictionaries
{
    /// <summary>
    /// 数据字典应用层接口
    /// </summary>
    public interface IDataDictionaryAppService : IApplicationService
    {
        #region 数据字典
        /// <summary>
        /// 获取数据字典集合
        /// </summary>
        /// <returns></returns>
        Task<ListResultDto<DataDictionaryListDto>> GetAllDataDictionary();

        /// <summary>
        /// 获取数据字典记录
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<GetDataDictionaryForEditOutput> GetDataDictionaryForEdit(NullableIdDto<long> input);

        /// <summary>
        /// 添加或更新数据字典记录
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task CreateOrUpdateDataDictionary(CreateOrUpdateDataDictionaryInput input);

        /// <summary>
        /// 删除数据字典记录
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task DeleteDataDictionary(List<EntityDto<long>> inputs);

        /// <summary>
        /// 根据字典类型名称获取数据字典集合
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<ListResultDto<DataDictionaryListDto>> GetDataDictionaryListByTypeNames(GetDataDictionaryListByTypeNamesInput input);
        #endregion

        #region 数据字典项
        /// <summary>
        /// 获取数据字典列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<ListResultDto<DataDictionaryItemListDto>> GetAllDataDictionaryItem(GetAllDataDictionaryItemInput input);

        /// <summary>
        /// 获取数据字典项
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<GetDataDictionaryItemForEditOutput> GetDataDictionaryItemForEdit(NullableIdDto<long> input);

        /// <summary>
        /// 添加或更新数据字典项
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task CreateOrUpdateDataDictionaryItem(CreateOrUpdateDataDictionaryItemInput input);

        /// <summary>
        /// 删除数据字典项
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task DeleteDataDictionaryItem(List<EntityDto<long>> inputs);

        /// <summary>
        /// 根据字典类型和字典项名称获取字典项值
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<GetDataDictionaryItemNameOutput> GetDataDictionaryItemName(GetDataDictionaryItemNameInput input);
        #endregion
    }
}
